﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.Cryptography.X509Certificates;
using System.IdentityModel.Tokens;
using System.IdentityModel.Selectors;
using Sinacor.Infra.Common.Security.Authentication.Credentials;

namespace Sinacor.Infra.Common.Security.Authentication.ClientCredentials
{
    
    internal class SinacorTokenProvider : SecurityTokenProvider
    {
        SinacorUserInfo _userInfo;

        public SinacorTokenProvider(SinacorUserInfo userInfo)
        {
            this._userInfo = userInfo;
        }

        protected override SecurityToken GetTokenCore(TimeSpan timeout)
        {
            return new SinacorToken(_userInfo);
        }
    }

}
